package com.situ.ssm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.situ.ssm.entity.User;
import com.situ.ssm.entity.UserExample;
import com.situ.ssm.mapper.UserMapper;
import com.situ.ssm.service.IUserService;

@Service
public class UserServiceImpl implements IUserService{
	@Autowired
	private UserMapper userMapper;

	@Override
	public List<User> findAll() {
		int count = userMapper.countByExample(new UserExample());
		System.out.println("count: " + count);
		List<User> list=  userMapper.selectByExample(new UserExample());
		// userMapper.selectByPrimaryKey(id)
		return list;
	}

}
